Upgrade WebdriverIO e2e stack from v8 to v9#1930
Conversation
*Why* Dependabot raised four separate, interdependent bumps for the WebdriverIO v8→v9 migration (@wdio/cli #1787, @wdio/mocha-framework #1788, @wdio/types #1789, wdio-video-reporter #1785). None can merge individually because the @wdio/* packages must move in lockstep and the v9 line additionally requires wdio-vscode-service v8 (its v8 peer-depends on webdriverio@^9). This single PR performs the coordinated upgrade so the e2e tooling can advance. *What* - Bump @wdio/cli, @wdio/local-runner, @wdio/mocha-framework, @wdio/spec-reporter and @wdio/types to ^9.29.0; wdio-video-reporter to ^6.2.0; and wdio-vscode-service to ^8.0.0 (required for webdriverio@^9). - wdio.conf.ts: type the config as WebdriverIO.Config (v9 moved `capabilities` out of Options.Testrunner) and remove the removed `autoCompileOpts`/ts-node block. v9 transpiles TS via the bundled `tsx`; the tsconfig is now passed with `--tsConfigPath` in the `test:integ:extension` script. - e2e tsconfig: add the DOM lib and skipLibCheck, which v9's webdriverio types now require. - commonUtils.ts: `expect(string).not.toHaveText()` is element-only in v9's expect-webdriverio; switch the string assertion to `.not.toBe("-")`. *Verification* - `tsc --noEmit -p src/test/e2e/tsconfig.json` passes (0 errors). - `eslint` + `prettier -c` clean on changed files. - `yarn install` resolves cleanly to webdriverio 9.29.0 with no peer conflicts. - `yarn run build` succeeds. - Note: the e2e suite itself runs only in CI (needs a VS Code download, VSIX build and a live Databricks workspace), so the runtime e2e run is left to CI. Backward compatibility: dev/test-tooling only — no runtime, API, persisted state or config-format changes; the shipped extension is unaffected. Co-authored-by: Isaac
|
Integration tests: https://github.com/databricks-eng/eng-dev-ecosystem/actions/runs/28456302366 |
*Why*
After the v8->v9 upgrade every e2e spec failed in CI with `Can't find view
control "CONFIGURATION"`. Root cause (from the eng-dev-ecosystem integration
run): WebdriverIO v9 loads TypeScript by injecting `--import <tsx loader>` into
NODE_OPTIONS. wdio-vscode-service installs the Databricks extension by spawning
the VS Code (Electron) `code` CLI, which inherits NODE_OPTIONS, and Electron
hard-rejects `--import` there ("Code.exe: --import is not allowed in
NODE_OPTIONS"). The extension never installs, so its sidebar view is absent and
all specs fail.
*What*
- In wdio.conf.ts, strip `--import <loader>` from process.env.NODE_OPTIONS, but
only in worker processes (WDIO_WORKER_ID set). tsx has already registered its
loader in-process by the time the config module loads, so in-process spec
transpilation is unaffected; only child processes (the `code`/`databricks`
CLIs) stop inheriting the rejected flag. The launcher keeps NODE_OPTIONS
intact so the workers it spawns still receive tsx.
*Verification*
- `tsc --noEmit -p src/test/e2e/tsconfig.json` passes; eslint + prettier clean.
- Full e2e validation is delegated to the eng-dev-ecosystem integration run on CI
(cannot run the VS Code e2e suite locally).
Backward compatibility: dev/test-tooling only; no runtime/API/state/format change.
Co-authored-by: Isaac
Integration test validation (wdio v9)The e2e suite runs in Result: the v9 upgrade works. The systemic regression is fixed and the remaining failures are pre-existing suite flakiness, not caused by this PR. Before the NODE_OPTIONS fixEvery e2e shard failed identically with After the fix (manual run
|
|
All e2e tests seems to be failing (except SDK tests), https://github.com/databricks-eng/eng-dev-ecosystem/actions/runs/28456302366 Current e2e tests are run on node 18 with engine "vscode": "^1.86.0" |
|
@misha-db I ran a controlled side-by-side to settle whether the failures are from this PR or pre-existing. Both dispatched back-to-back on the same runners:
The failing-spec sets are identicalEvery spec that fails on this PR also fails on main today (on both linux and windows):
Same failure modes on both branches — all environmental/network, none v9-related:
Zero activation regressions
Compatibility recap (node 18 / vscode ^1.86.0)All v9 packages require Net: the v8→v9 upgrade doesn't introduce any e2e regression — it inherits the suite's existing (pre-existing, unrelated) flakiness. Happy to rebase or adjust if you'd prefer, but I don't think the red shards here are attributable to this change. |
|
Update — a workspace-side fix (clearing the 19 passing / 13 failing (was 10/22 before the fix). Now passing (both linux + windows): The remaining reds are one environmental cause — the CI runner can't reach the Terraform registry: That accounts for So: the v9 upgrade itself is clean — the deploy failures were the workspace size limit, and the rest is the runner's network reach to |
| const startTime = await browser.getTextByLabel("run-start-time"); | ||
| console.log("Run start time:", startTime); | ||
| expect(startTime).not.toHaveText("-"); | ||
| expect(startTime).not.toBe("-"); |
There was a problem hiding this comment.
Does this cause failures like this? https://github.com/databricks-eng/eng-dev-ecosystem/actions/runs/28535316753/job/84595355077#step:18:305
*Why* Review feedback on #1930 flagged that `waitForWorkflowWebview` fails at the run-start-time check on slower (e.g. serverless) runs: `Run start time: -` -> `expect(received).not.toBe(expected)`. Investigation showed the original `expect(startTime).not.toHaveText("-")` was a no-op — `toHaveText` is an expect-webdriverio *element* matcher and `startTime` is a plain string (getTextByLabel returns `elem.getText()`), so it never asserted anything and "-" always slipped through. The v9 tsconfig surfaced this (element matcher on a string), and my interim `.not.toBe("-")` turned it into a correct but *instant* assertion — which flakes because the webview renders "-" as a placeholder until the run details arrive. *What* - Replace the single-shot assertion with a `browser.waitUntil` that polls `run-start-time` until it is populated (not "-", non-empty), matching the surrounding waitUntil pattern (60s timeout, 1s interval). This asserts the original intent — start time eventually populates — without racing the placeholder. *Verification* - `tsc --noEmit -p src/test/e2e/tsconfig.json` passes; eslint + prettier clean. - Behavior validated on CI: this addresses the run-start-time failure seen in eng-dev-ecosystem run 28535316753 (serverless spec). Backward compatibility: e2e test-only; no runtime/API/state/format change. Co-authored-by: Isaac
|
If integration tests don't run automatically, an authorized user can run them manually by following the instructions below: Trigger: Inputs:
Checks will be approved automatically on success. |
Why
Dependabot raised four separate, interdependent bumps for the WebdriverIO v8→v9 migration that cannot merge individually:
@wdio/cli8→9@wdio/mocha-framework8→9@wdio/types8→9wdio-video-reporter5→6The
@wdio/*packages must move in lockstep, and the v9 line additionally requireswdio-vscode-servicev8 (its v8 peer-depends onwebdriverio@^9) — which Dependabot never proposed. This PR performs the coordinated upgrade so the e2e tooling can advance, and supersedes the four PRs above.What
@wdio/cli,@wdio/local-runner,@wdio/mocha-framework,@wdio/spec-reporter,@wdio/types→^9.29.0;wdio-video-reporter→^6.2.0;wdio-vscode-service→^8.0.0.wdio.conf.ts: type the config asWebdriverIO.Config(v9 movedcapabilitiesout ofOptions.Testrunner) and drop the removedautoCompileOpts/ts-node block. v9 transpiles TS via the bundledtsx; the tsconfig is now passed with--tsConfigPathin thetest:integ:extensionscript.tsconfig.json: add theDOMlib andskipLibCheck, now required by v9'swebdriveriotypes.commonUtils.ts:expect(string).not.toHaveText()is element-only in v9'sexpect-webdriverio; switched the string assertion to.not.toBe("-").Verification
tsc --noEmit -p src/test/e2e/tsconfig.jsonpasses (0 errors)eslint+prettier -cclean on changed filesyarn installresolves cleanly towebdriverio9.29.0 with no peer conflictsyarn run buildsucceedsBackward compatibility: dev/test-tooling only — no runtime, API, persisted-state or config-format changes; the shipped extension is unaffected.
This pull request and its description were written by Isaac.